Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAJOR UPGRADE: Snapweb - GatsbyJS Edition #41

Closed
wants to merge 48 commits into from

Conversation

daredoes
Copy link

@daredoes daredoes commented Mar 16, 2022

First, and most importantly, thank you.

Snapcast, and Snapweb, have been amazing. I noticed the comment about the current iteration being a proof-of-concept typescript project for the Snapcast Websocket API, so I hope you may consider this iteration something closer to your imagined concept, if not v1.0.0.

NOW, BRACE YOURSELF

This pull request contains

  • A refactor of the snapcontrol.ts and snapstream.ts into individual type files, classes, and React components.
  • A Singleton Controller that is used connect to the websocket
  • Usage of React, utilizing GatsbyJS to produce a static website with low-effort WebWorker setup
  • Usage of Redux and Redux-Persist (using localForage) to manage WebWorker state, and app state
  • Usage of React + Redux to simplify class logic into Components that individually manage their actions
  • A whole new style library Grommet
  • Adds formik
  • Removes "Group Volume" concept (planned to be re-implemented later with new logic) (Fixes Group with just one client can't be unmuted #6)
  • Adds ability to edit "Group Name"
  • Uses "Group Name" when switching client between Groups
  • Changes name of site in the upper left to match name from server
  • Adds server version to footer (Fixes Missing license and version information #15)
  • Adds ability to show/hide offline clients and delete clients (Fixes Support for showing disconnected devices / Removing stale devices #7 and Fixes I want to make a pull request Add in 3-dot menu with show offline clients. slider volume percent. #33)
  • Adds server settings form that allows setting of SERVER URL (https://snapserver.com), will be automatically transformed into the API (wss://snapserver.com/jsonrpc) and stream (wss://snapserver.com/stream) endpoints, or API and Stream can be set directly for edge cases (http is transformed). (Fixes Doesn't work when behind a HTTPS reverse proxy #21)
  • API, stream, or server url by passing the respective value as an encoded query parameter of either api stream or server respectively. ?api=https%3A%2F%2Fserver.com%0A
  • Stream or server URL can by set with the following env vars during build time GATSBY_SNAPSERVER and GATSBY_SNAPSTREAM. This will auto-connect to the given servers during first load instead of providing a blank page (basically makes it the same as the current version in a way)
  • Fixes HTML input is not sanitized #36 since Gatsby/React makes sure HTML is sanitized unless passed in a specific manner

Lastly, because this version is a static website, I have hosted it for free on netlify at snapweb.netlify.app. You can install it locally and try it, or test it there 🎉

Please do not feel rushed to review this pull request. Any time you have to look over the massive amount of changes is appreciated.

Client Settings Screen

Edit Group Settings

Edit Group Stream

Edit Server Settings

Edit Server Settings Custom

Home Screen

@curiousercreative
Copy link
Contributor

@daredoes are you still proposing this?

@daredoes
Copy link
Author

daredoes commented Jul 10, 2023 via email

@badaix
Copy link
Owner

badaix commented Mar 4, 2024

Many thanks for your pull request, it looks very good. However, your changes go far beyond the implementation of a feature or a bugfix. It is much more of an independent project, so I will not merge the PR.
But I can link to your project in Snapcast, just as other frontends are already linked there.

@daredoes
Copy link
Author

daredoes commented Mar 4, 2024

@badaix up to you. I really love snapcast, I use it daily. I work full-time in React/Python. If you want help on any of the snapweb stuff you have, tag me in a ticket.

@badaix
Copy link
Owner

badaix commented Jun 6, 2024

Thanks for you offer @daredoes , I will do so 👍

@badaix badaix closed this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment